/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUIv2;

import jsonObjects.Profile;
import serverHandling.SessionObjects;

import java.util.List;

public class MonitoredFolderReplacePanel extends javax.swing.JPanel {
    private static final long serialVersionUID = 663581184137740859L;
    public MonitoredFolderReplacePanel() {
        initComponents();
    }

    @SuppressWarnings("serial")
    private void initComponents() {
        List<Profile> activProfTab = SessionObjects.getProfiles();
        Object[][] futureMenuItems;
        if (activProfTab != null) {
            futureMenuItems = new Object[activProfTab.size()][activProfTab
                    .size()];
            for (int i = 0; i < activProfTab.size(); i++) {
                futureMenuItems[i][0] = activProfTab.get(i).getName();
            }
        } else
            futureMenuItems = new Object[0][0];

        monitoredFolderReplacePanel = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTable4 = new javax.swing.JTable();

        jTable4.setModel(new javax.swing.table.DefaultTableModel(
                futureMenuItems,
                new String[]{
                        "Name"
                }
        ){
        boolean[] canEdit = new boolean [] {
                false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTable4.getColumnModel().getColumn(0).setResizable(false);

        jScrollPane4.setViewportView(jTable4);

        javax.swing.GroupLayout monitoredFolderReplacePanelLayout = new javax.swing.GroupLayout(monitoredFolderReplacePanel);
        monitoredFolderReplacePanel.setLayout(monitoredFolderReplacePanelLayout);
        monitoredFolderReplacePanelLayout.setHorizontalGroup(
                monitoredFolderReplacePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(monitoredFolderReplacePanelLayout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
                                .addContainerGap())
        );
        monitoredFolderReplacePanelLayout.setVerticalGroup(
                monitoredFolderReplacePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(monitoredFolderReplacePanelLayout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)
                                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(monitoredFolderReplacePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(monitoredFolderReplacePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
    }

    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTable jTable4;
    private javax.swing.JPanel monitoredFolderReplacePanel;
}